The present application describes systems and techniques relating to blending of image data, for example, blending of digital image data from one image region with digital image data from another image region.
Traditional techniques for blending image regions typically produce a new intensity value, I3, based on two original values, I1 and I2, and a scalar blending parameter, β, which ranges from zero to one. Frequently, the blending function is required to yield I1 when β equals zero and I2 when β equals one, and to produce a continuous range of intermediate intensity values for intermediate values of β. This type of blending is also known as interpolation. For example, a linear interpolation function can be:blend(I1, I2, β)=(1−β)I1+β I2.  (1)The blend coefficients, (1−β) and β, satisfy the blending function requirements and create a resulting blended image for varying values of the blending parameter, β, that is a simple linear blend the original image regions.
The image regions that can be blended with such traditional techniques include image portions from one or more images and images from multiple layers forming a composite image. For example, the Clone Stamp tool in Photoshop® software, provided by Adobe Systems Incorporated of San Jose, Calif., blends a portion of an image with another portion of the same image, or with a portion of another image. Various modes are available for combining data from two image regions, ranging from complete replacement of destination pixels by source pixels to linear and nonlinear techniques for graded combinations of source and destination image regions (e.g., a soft edge on a clone brush). Thus, a transition region can be defined in which the blended image data transitions from entirely source pixel data to entirely destination pixel data, with blended data there between.
Blending can also be performed on image data having multiple color components. When mixing data from one image region into another image region, color values typically blend smoothly, but other aspects of the image data may not. For example, noise characteristics of the image regions tend to cancel each other out, thereby creating artifacts in a resulting blended image that the human eye can detect. In the context of the Clone Stamp tool, an apparent halo can be produced around the cloned region, where mismatched noise characteristics are apparent to the eye, such as from noise cancellation.
Laplacian blending is a traditional technique that attempts to address noise cancellation issues by breaking the original images up into higher and lower frequency components and blending the higher frequency components over a shorter distance in the transition region. This can be represented by using a blending function:L_blend(I1, I2, β)=(1−F(β))I1+F(β)I2,  (2)where F(x) is a contrast increasing function for blending the high-frequency components. The function F(x) forces blending to smaller regions, for higher frequencies. This will result in a faster transition in the high-frequency components and thereby reduce the size of any region affected by noise cancellation while still allowing a gradual overall transition. This can be extended to more than two frequency components by using different functions F for each component.
Moreover, interpolation can be performed in a different space. For example, if a function F maps the image data into another space and a function G is the inverse of F, an interpolation function can work in the space of the mapped data, and a new interpolation function can be as follows:G_blend(I1, I2, β)=G((1−β)F(I1)+β F(I2)).  (3)Gamma compensated blending is an example of this.